from sqlalchemy import Column, String, Integer, Date, DateTime
from sqlalchemy.ext.declarative import declarative_base
from datetime import datetime

# 创建对象的基类:
Base = declarative_base()

class Article(Base):
    # 表的名字:
    __tablename__ = 'bq_articles'

    # 表的结构:
    id = Column(Integer, primary_key=True)
    article_name = Column(String(20))
    url = Column(String(255))
    logo = Column(String(255))
    author = Column(String(20))
    article_time = Column(Date())
    source = Column(String(20))
    status = Column(Integer(), default=0)
    creat_time = Column(DateTime(), default=datetime.now())